﻿using JMcms.Common;
using System.Data;

namespace JMcms.Web.Plugin.Favorite
{
    public partial class favorite :Web.UI.UserPage
    {
        protected int page;         //当前页码
        protected int totalcount;   //OUT数据总数

        /// <summary>
        /// 重写虚方法,此方法在Init事件执行
        /// </summary>
        protected override void InitPage()
        {
            page = JMRequest.GetQueryInt("page", 1);
        }

        /// <summary>
        /// 收藏分页列表
        /// </summary>
        /// <param name="page_size">页面大小</param>
        /// <param name="page_index">当前页码</param>
        /// <param name="strwhere">查询条件</param>
        /// <param name="totalcount">总记录数</param>
        /// <returns>DateTable</returns>
        protected DataTable get_user_favorite_list(int page_size, int page_index, string strwhere, out int totalcount)
        {
            return new BLL.favorite().GetList(page_size, page_index, strwhere, "add_time desc", out totalcount).Tables[0];
        }
    }
}
